<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/public/bootstrap/css/bootstrap.css" rel="stylesheet" />
<title>用户登录</title>
<style>
.loginborder{
    border:1px solid #eee;
    padding:10px;
    width:350px;
    position:absolute;
    margin-left:500px;
    margin-top:125px;
    }
.login{
    width:345px;
    height:280px;
    border:1px solid #eee;
    background:url("/public/images/bg.jpg");
    background-repeat:repeat;
}
.logininput{
    margin-top:15px;
    }
</style>
</head>

<body>
<div class="loginborder">
<div class="login">
    <div class="logininput">
    <img src="/public/images/logo.jpg" style="margin-left:35px;" />
    <hr />
    <div style="margin-left:45px">
    <form name="frm" method="post" action="/Default/dologin">
    <div class="input-prepend">
              <span class="add-on"><span class="icon-user"></span></span>
              <input type="text" placeholder="UserName" name="login" id="login" class="input-large">
            </div><br />
    <div class="input-prepend">
              <span class="add-on"><span class="icon-lock"></span></span>
              <input type="password" placeholder="PassWord" name="passwd" id="passwd" class="input-large">
            </div><br />
            
            <button class="btn btn-warning" onclick="return validate();" style="width:250px;" type="button"><h3 style="color:#FFF">登&nbsp;&nbsp;&nbsp;&nbsp;录</h3></button>
            </form>
    </div>        
    </div>
</div>
</div>
<script>
    function validate(){
            var login = document.getElementById('login').value;
            var passwd = document.getElementById('passwd').value;
            if(login == '' || passwd == '' || login.length < 4 || passwd.length < 6){
                alert('登录信息填写错误,检查重填!');
                return false;
                }
            document.frm.submit();    
        }
</script>
</body>
</html>

